package csc.daonjpa.java.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Entity class for Account table. This is a simple POJO class with annotations to define mapping with DB table
 * @author nvu3
 *
 */
@Entity
@Table(name="customer_role")
public class CustomerRole implements Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue
	@Column(name = "id")
	private int id;
	
	@Column(name="role")
	private String role;
	
	@ManyToOne
	@JoinColumn(name="loginId")
	private Customer customer;

	/**
	 * Required constructor
	 */
	public CustomerRole() {
	
	}

	public CustomerRole(int id, String role, Customer customer) {
		super();
		this.id = id;
		this.role = role;
		this.customer = customer;
	}



	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	
	
}